home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
i_set.exe
/
README
< prev
Wrap
Text File
|
1991-09-05
|
2KB
|
93 lines
CHOOSE is a minimal utility based on I-SET.
It was developed (and is now heavily used) by a crowded programming
lab which has to deal with multiple environments.
To cut off with all those terrible .BATs to change path, lib, tmp, help
and so on in the environment we got CHOOSE running.
CHOOSE reads as input a text file named CHOOSE.INI which is expected
to be in the directory pointed by the INIT environment variable.
Anyway the -f switch will direct CHOOSE to use any file.
The CHOOSE.INI file is a pure-ASCII file composed of "sections". Sections
are identified by a beginning "tag", that is, a string enclosed in square
brackets. A section ends with the beginning of the next or the end of
the file.
In a section there can be any number of CHOOSE commands. Commands are
simple one-liners which deal with modifying the environment.
Sections are executed if given on CHOOSE command-line. Sections named
"choose" are alway executed. See the use() command to see how to exploit
this behaviour. For example,
choose c
will execute the section [C] in choose.ini.
The grammar is easily retrieved by typing "choose -h".
This is an actual CHOOSE.INI file. Obviously directories will be different
everywhere else!
[CHOOSE]
init="d:\init"
[shari]
; user SHARI
use("C")
use("log")
[PUS]
; user PUS
if ("D:\C\BIN" in PATH)
use("~C")
end
use ("log")
[LOG]
dos("c:\lanman.dos\netprog\net logon /Y")
; change path to network utlities
PATH-="C:\BIN"
PATH-="C:\USR\BIN"
PATH-="C:\USR\LBIN"
PATH+="W:\BIN"
PATH+="W:\USR\BIN"
PATH+="W:\USR\LBIN"
[LOGOFF]
dos("c:\lanman.dos\netprog\net logoff /Y")
PATH-="W:\BIN"
PATH-="W:\USR\BIN"
PATH-="W:\USR\LBIN"
PATH+="C:\BIN"
PATH+="C:\USR\BIN"
PATH+="C:\USR\LBIN"
[C]
PATH^="D:\C\BIN"
PATH+="D:\C\BINB"
LIB+="D:\C\LIB"
INCLUDE^="D:\C\INCLUDE"
HELPFILES+="D:\C\HELP"
[~C]
PATH-="D:\C\BIN"
PATH-="D:\C\BINB"
LIB-="D:\C\LIB"
INCLUDE-="D:\C\INCLUDE"
HELPFILES-="D:\C\HELP"
[SIMHLAPI]
SIMFILES="E:\SIMPC\SIMHLAPI"
PATH+=SIMFILES
[xSIMHLAPI]
if (isset("SIMFILES"))
PATH-=SIMFILES
-SIMFILES
end
[RESET]
-LIB
-INCLUDE
-HELPFILES
PATH="C:\DOS;E:\WIN3"